﻿using System.Web.Mvc;

namespace SchoolManagerMVC.Web.Areas.Departments
{
    public class DepartmentsAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Departments";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "Departments_default",
                "Departments/{controller}/{action}/{id}",
                new { action = "Index",controller = "Home", id = UrlParameter.Optional }
            );

            context.MapRoute(
                "Departments",
                "Departments",
                new { controller = "Home", action = "Index", area = "Departments" }
            );
        }
    }
}
